﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ERPStore.Web.Events
{
	public class PageNotFoundEvent
	{
		public string Url { get; set; }
		public DateTime Date { get; set; }
		public string IP { get; set; }
		public string UserAgent { get; set; }
		public Uri Referer { get; set; }
		public string ApplicationPath { get; set; }
		public string Method { get; set; }
		public string Cookie { get; set; }
		public override string ToString()
		{
			var sb = new StringBuilder();
			sb.AppendLine(string.Format("Url : {0}", Url));
			sb.AppendLine(string.Format("Date : {0}", Date));
			sb.AppendLine(string.Format("UserAgent : {0}", UserAgent));
			if (Referer != null)
			{
				sb.AppendLine(string.Format("Referer : {0}", Referer));
			}
			sb.AppendLine(string.Format("ApplicationPath : {0}", ApplicationPath));
			sb.AppendLine(string.Format("Method : {0}", Method));
			sb.AppendLine(string.Format("Cookie : {0}", Cookie));
			return sb.ToString();
		}
	}
}
